<!--
 * @Author: fanyaqing
 * @Date: 2021-08-05 08:34:25
 * @LastEditTime: 2021-08-08 11:37:11
 * @LastEditors: fanyaqing
 * @Description: 
 * @FilePath: \supermall\src\views\category\category.vue
-->
<template>
  <div class="wrapper">
    <ul class="content">
      <li v-for="(item, index) in 100" :key="index">{{item}}</li>
    </ul>
  </div>
</template>
<script>
import BetterScroll from 'better-scroll';
export default {
  data() {
    return {
      scroll:null
    }
  },
  mounted(){
    this.scroll=new BetterScroll(document.querySelector('.wrapper'),{
      probeType:3,
      pullUpLoad:true
    })
    this.scroll.on('scroll',(position)=>{
      // console.log(position)
    })
    this.scroll.on('pullingUp',()=>{
      console.log('加载更多')
    })
  }
}
</script>
<style scoped>
.wrapper{
  height: 150px;
  background: red;

  overflow: hidden;
}
</style>